package com.tutu.mybatis.dynamic.datasource.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.tutu.mybatis.dynamic.datasource.util.Long2StringJsonSerializer;
import lombok.Data;

import java.io.Serializable;

/**
 * @author 丘友垚
 * @version 1.0
 * @date 2020/9/23 19:21
 */
@Data
@TableName("t_user")
public class User implements Serializable {
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = Long2StringJsonSerializer.class)
    private Long id;
    @TableField("username")
    private String username;
    @TableField("datasource_url")
    private String datasourceUrl;
    @TableField("datasource_username")
    private String datasourceUsername;
    @TableField("datasource_password")
    private String datasourcePassword;

}
